
package util;

import java.sql.*;

// Referenced classes of package util:
//            ConnectionManager

public class IdHandler {
    
    public IdHandler() {
    }
    
    public static String validate(String username1, String password1) {
        try {
            String query = "select * from member where userID ='" + username1 + "' AND password ='" + password1 + "'";
            ResultSet rs;
            Connection con = ConnectionManager.connect();
            Statement stmt = con.createStatement();
            rs = stmt.executeQuery(query);
            if(rs.next())
                return rs.getString("identity");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
        
    }
}